$OpenBSD: patch-src_buffer_c,v 1.4 2013/11/25 15:27:56 dcoppa Exp $
--- src/buffer.c.orig	Fri Nov 15 10:51:53 2013
+++ src/buffer.c	Fri Nov 15 10:54:02 2013
@@ -31,7 +31,7 @@ static int sendraw(p_buffer buf, const char *data, siz
 /*-------------------------------------------------------------------------*\
 * Initializes module
 \*-------------------------------------------------------------------------*/
-int buffer_open(lua_State *L) {
+int ls_buffer_open(lua_State *L) {
     (void) L;
     return 0;
 }
@@ -39,7 +39,7 @@ int buffer_open(lua_State *L) {
 /*-------------------------------------------------------------------------*\
 * Initializes C structure 
 \*-------------------------------------------------------------------------*/
-void buffer_init(p_buffer buf, p_io io, p_timeout tm) {
+void ls_buffer_init(p_buffer buf, p_io io, p_timeout tm) {
     buf->first = buf->last = 0;
     buf->io = io;
     buf->tm = tm;
@@ -50,7 +50,7 @@ void buffer_init(p_buffer buf, p_io io, p_timeout tm) 
 /*-------------------------------------------------------------------------*\
 * object:getstats() interface
 \*-------------------------------------------------------------------------*/
-int buffer_meth_getstats(lua_State *L, p_buffer buf) {
+int ls_buffer_meth_getstats(lua_State *L, p_buffer buf) {
     lua_pushnumber(L, (lua_Number) buf->received);
     lua_pushnumber(L, (lua_Number) buf->sent);
     lua_pushnumber(L, timeout_gettime() - buf->birthday);
@@ -60,7 +60,7 @@ int buffer_meth_getstats(lua_State *L, p_buffer buf) {
 /*-------------------------------------------------------------------------*\
 * object:setstats() interface
 \*-------------------------------------------------------------------------*/
-int buffer_meth_setstats(lua_State *L, p_buffer buf) {
+int ls_buffer_meth_setstats(lua_State *L, p_buffer buf) {
     buf->received = (long) luaL_optnumber(L, 2, (lua_Number) buf->received); 
     buf->sent = (long) luaL_optnumber(L, 3, (lua_Number) buf->sent); 
     if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4);
@@ -71,7 +71,7 @@ int buffer_meth_setstats(lua_State *L, p_buffer buf) {
 /*-------------------------------------------------------------------------*\
 * object:send() interface
 \*-------------------------------------------------------------------------*/
-int buffer_meth_send(lua_State *L, p_buffer buf) {
+int ls_buffer_meth_send(lua_State *L, p_buffer buf) {
     int top = lua_gettop(L);
     int err = IO_DONE;
     size_t size = 0, sent = 0;
@@ -106,7 +106,7 @@ int buffer_meth_send(lua_State *L, p_buffer buf) {
 /*-------------------------------------------------------------------------*\
 * object:receive() interface
 \*-------------------------------------------------------------------------*/
-int buffer_meth_receive(lua_State *L, p_buffer buf) {
+int ls_buffer_meth_receive(lua_State *L, p_buffer buf) {
     int err = IO_DONE, top = lua_gettop(L);
     luaL_Buffer b;
     size_t size;
@@ -157,7 +157,7 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) {
 /*-------------------------------------------------------------------------*\
 * Determines if there is any data in the read buffer
 \*-------------------------------------------------------------------------*/
-int buffer_isempty(p_buffer buf) {
+int ls_buffer_isempty(p_buffer buf) {
     return buf->first >= buf->last;
 }
 
@@ -252,7 +252,7 @@ static int recvline(p_buffer buf, luaL_Buffer *b) {
 static void buffer_skip(p_buffer buf, size_t count) {
     buf->received += count;
     buf->first += count;
-    if (buffer_isempty(buf)) 
+    if (ls_buffer_isempty(buf)) 
         buf->first = buf->last = 0;
 }
 
@@ -264,7 +264,7 @@ static int buffer_get(p_buffer buf, const char **data,
     int err = IO_DONE;
     p_io io = buf->io;
     p_timeout tm = buf->tm;
-    if (buffer_isempty(buf)) {
+    if (ls_buffer_isempty(buf)) {
         size_t got;
         err = io->recv(io->ctx, buf->data, BUF_SIZE, &got, tm);
         buf->first = 0;
